Integrand size = 24, antiderivative size = 118 \[ \int \sec ^5(c+d x) (a+i a \tan (c+d x))^2 \, dx=\frac {7 a^2 \text {arctanh}(\sin (c+d x))}{16 d}+\frac {7 i a^2 \sec ^5(c+d x)}{30 d}+\frac {7 a^2 \sec (c+d x) \tan (c+d x)}{16 d}+\frac {7 a^2 \sec ^3(c+d x) \tan (c+d x)}{24 d}+\frac {i \sec ^5(c+d x) \left (a^2+i a^2 \tan (c+d x)\right )}{6 d} \]
[Out]
Time = 0.13 (sec) , antiderivative size = 118, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {3579, 3567, 3853, 3855} \[ \int \sec ^5(c+d x) (a+i a \tan (c+d x))^2 \, dx=\frac {7 a^2 \text {arctanh}(\sin (c+d x))}{16 d}+\frac {7 i a^2 \sec ^5(c+d x)}{30 d}+\frac {i \sec ^5(c+d x) \left (a^2+i a^2 \tan (c+d x)\right )}{6 d}+\frac {7 a^2 \tan (c+d x) \sec ^3(c+d x)}{24 d}+\frac {7 a^2 \tan (c+d x) \sec (c+d x)}{16 d} \]
[In]
[Out]
Rule 3567
Rule 3579
Rule 3853
Rule 3855
Rubi steps \begin{align*} \text {integral}& = \frac {i \sec ^5(c+d x) \left (a^2+i a^2 \tan (c+d x)\right )}{6 d}+\frac {1}{6} (7 a) \int \sec ^5(c+d x) (a+i a \tan (c+d x)) \, dx \\ & = \frac {7 i a^2 \sec ^5(c+d x)}{30 d}+\frac {i \sec ^5(c+d x) \left (a^2+i a^2 \tan (c+d x)\right )}{6 d}+\frac {1}{6} \left (7 a^2\right ) \int \sec ^5(c+d x) \, dx \\ & = \frac {7 i a^2 \sec ^5(c+d x)}{30 d}+\frac {7 a^2 \sec ^3(c+d x) \tan (c+d x)}{24 d}+\frac {i \sec ^5(c+d x) \left (a^2+i a^2 \tan (c+d x)\right )}{6 d}+\frac {1}{8} \left (7 a^2\right ) \int \sec ^3(c+d x) \, dx \\ & = \frac {7 i a^2 \sec ^5(c+d x)}{30 d}+\frac {7 a^2 \sec (c+d x) \tan (c+d x)}{16 d}+\frac {7 a^2 \sec ^3(c+d x) \tan (c+d x)}{24 d}+\frac {i \sec ^5(c+d x) \left (a^2+i a^2 \tan (c+d x)\right )}{6 d}+\frac {1}{16} \left (7 a^2\right ) \int \sec (c+d x) \, dx \\ & = \frac {7 a^2 \text {arctanh}(\sin (c+d x))}{16 d}+\frac {7 i a^2 \sec ^5(c+d x)}{30 d}+\frac {7 a^2 \sec (c+d x) \tan (c+d x)}{16 d}+\frac {7 a^2 \sec ^3(c+d x) \tan (c+d x)}{24 d}+\frac {i \sec ^5(c+d x) \left (a^2+i a^2 \tan (c+d x)\right )}{6 d} \\ \end{align*}
Time = 0.24 (sec) , antiderivative size = 108, normalized size of antiderivative = 0.92 \[ \int \sec ^5(c+d x) (a+i a \tan (c+d x))^2 \, dx=\frac {7 a^2 \text {arctanh}(\sin (c+d x))}{16 d}+\frac {2 i a^2 \sec ^5(c+d x)}{5 d}+\frac {7 a^2 \sec (c+d x) \tan (c+d x)}{16 d}+\frac {7 a^2 \sec ^3(c+d x) \tan (c+d x)}{24 d}-\frac {a^2 \sec ^5(c+d x) \tan (c+d x)}{6 d} \]
[In]
[Out]
Time = 19.59 (sec) , antiderivative size = 133, normalized size of antiderivative = 1.13
method | result | size |
risch | \(-\frac {i a^{2} \left (105 \,{\mathrm e}^{11 i \left (d x +c \right )}+595 \,{\mathrm e}^{9 i \left (d x +c \right )}-1686 \,{\mathrm e}^{7 i \left (d x +c \right )}-1386 \,{\mathrm e}^{5 i \left (d x +c \right )}-595 \,{\mathrm e}^{3 i \left (d x +c \right )}-105 \,{\mathrm e}^{i \left (d x +c \right )}\right )}{120 d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{6}}-\frac {7 a^{2} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}{16 d}+\frac {7 a^{2} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{16 d}\) | \(133\) |
derivativedivides | \(\frac {-a^{2} \left (\frac {\sin ^{3}\left (d x +c \right )}{6 \cos \left (d x +c \right )^{6}}+\frac {\sin ^{3}\left (d x +c \right )}{8 \cos \left (d x +c \right )^{4}}+\frac {\sin ^{3}\left (d x +c \right )}{16 \cos \left (d x +c \right )^{2}}+\frac {\sin \left (d x +c \right )}{16}-\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{16}\right )+\frac {2 i a^{2}}{5 \cos \left (d x +c \right )^{5}}+a^{2} \left (-\left (-\frac {\left (\sec ^{3}\left (d x +c \right )\right )}{4}-\frac {3 \sec \left (d x +c \right )}{8}\right ) \tan \left (d x +c \right )+\frac {3 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )}{d}\) | \(152\) |
default | \(\frac {-a^{2} \left (\frac {\sin ^{3}\left (d x +c \right )}{6 \cos \left (d x +c \right )^{6}}+\frac {\sin ^{3}\left (d x +c \right )}{8 \cos \left (d x +c \right )^{4}}+\frac {\sin ^{3}\left (d x +c \right )}{16 \cos \left (d x +c \right )^{2}}+\frac {\sin \left (d x +c \right )}{16}-\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{16}\right )+\frac {2 i a^{2}}{5 \cos \left (d x +c \right )^{5}}+a^{2} \left (-\left (-\frac {\left (\sec ^{3}\left (d x +c \right )\right )}{4}-\frac {3 \sec \left (d x +c \right )}{8}\right ) \tan \left (d x +c \right )+\frac {3 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )}{d}\) | \(152\) |
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 364 vs. \(2 (102) = 204\).
Time = 0.25 (sec) , antiderivative size = 364, normalized size of antiderivative = 3.08 \[ \int \sec ^5(c+d x) (a+i a \tan (c+d x))^2 \, dx=\frac {-210 i \, a^{2} e^{\left (11 i \, d x + 11 i \, c\right )} - 1190 i \, a^{2} e^{\left (9 i \, d x + 9 i \, c\right )} + 3372 i \, a^{2} e^{\left (7 i \, d x + 7 i \, c\right )} + 2772 i \, a^{2} e^{\left (5 i \, d x + 5 i \, c\right )} + 1190 i \, a^{2} e^{\left (3 i \, d x + 3 i \, c\right )} + 210 i \, a^{2} e^{\left (i \, d x + i \, c\right )} + 105 \, {\left (a^{2} e^{\left (12 i \, d x + 12 i \, c\right )} + 6 \, a^{2} e^{\left (10 i \, d x + 10 i \, c\right )} + 15 \, a^{2} e^{\left (8 i \, d x + 8 i \, c\right )} + 20 \, a^{2} e^{\left (6 i \, d x + 6 i \, c\right )} + 15 \, a^{2} e^{\left (4 i \, d x + 4 i \, c\right )} + 6 \, a^{2} e^{\left (2 i \, d x + 2 i \, c\right )} + a^{2}\right )} \log \left (e^{\left (i \, d x + i \, c\right )} + i\right ) - 105 \, {\left (a^{2} e^{\left (12 i \, d x + 12 i \, c\right )} + 6 \, a^{2} e^{\left (10 i \, d x + 10 i \, c\right )} + 15 \, a^{2} e^{\left (8 i \, d x + 8 i \, c\right )} + 20 \, a^{2} e^{\left (6 i \, d x + 6 i \, c\right )} + 15 \, a^{2} e^{\left (4 i \, d x + 4 i \, c\right )} + 6 \, a^{2} e^{\left (2 i \, d x + 2 i \, c\right )} + a^{2}\right )} \log \left (e^{\left (i \, d x + i \, c\right )} - i\right )}{240 \, {\left (d e^{\left (12 i \, d x + 12 i \, c\right )} + 6 \, d e^{\left (10 i \, d x + 10 i \, c\right )} + 15 \, d e^{\left (8 i \, d x + 8 i \, c\right )} + 20 \, d e^{\left (6 i \, d x + 6 i \, c\right )} + 15 \, d e^{\left (4 i \, d x + 4 i \, c\right )} + 6 \, d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )}} \]
[In]
[Out]
\[ \int \sec ^5(c+d x) (a+i a \tan (c+d x))^2 \, dx=- a^{2} \left (\int \tan ^{2}{\left (c + d x \right )} \sec ^{5}{\left (c + d x \right )}\, dx + \int \left (- 2 i \tan {\left (c + d x \right )} \sec ^{5}{\left (c + d x \right )}\right )\, dx + \int \left (- \sec ^{5}{\left (c + d x \right )}\right )\, dx\right ) \]
[In]
[Out]
none
Time = 0.28 (sec) , antiderivative size = 181, normalized size of antiderivative = 1.53 \[ \int \sec ^5(c+d x) (a+i a \tan (c+d x))^2 \, dx=-\frac {5 \, a^{2} {\left (\frac {2 \, {\left (3 \, \sin \left (d x + c\right )^{5} - 8 \, \sin \left (d x + c\right )^{3} - 3 \, \sin \left (d x + c\right )\right )}}{\sin \left (d x + c\right )^{6} - 3 \, \sin \left (d x + c\right )^{4} + 3 \, \sin \left (d x + c\right )^{2} - 1} - 3 \, \log \left (\sin \left (d x + c\right ) + 1\right ) + 3 \, \log \left (\sin \left (d x + c\right ) - 1\right )\right )} + 30 \, a^{2} {\left (\frac {2 \, {\left (3 \, \sin \left (d x + c\right )^{3} - 5 \, \sin \left (d x + c\right )\right )}}{\sin \left (d x + c\right )^{4} - 2 \, \sin \left (d x + c\right )^{2} + 1} - 3 \, \log \left (\sin \left (d x + c\right ) + 1\right ) + 3 \, \log \left (\sin \left (d x + c\right ) - 1\right )\right )} - \frac {192 i \, a^{2}}{\cos \left (d x + c\right )^{5}}}{480 \, d} \]
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 237 vs. \(2 (102) = 204\).
Time = 0.55 (sec) , antiderivative size = 237, normalized size of antiderivative = 2.01 \[ \int \sec ^5(c+d x) (a+i a \tan (c+d x))^2 \, dx=\frac {105 \, a^{2} \log \left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1\right ) - 105 \, a^{2} \log \left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1\right ) + \frac {2 \, {\left (135 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{11} - 480 i \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{10} - 445 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{9} + 480 i \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{8} - 330 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 960 i \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{6} - 330 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 960 i \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 445 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 96 i \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 135 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 96 i \, a^{2}\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )}^{6}}}{240 \, d} \]
[In]
[Out]
Time = 7.90 (sec) , antiderivative size = 290, normalized size of antiderivative = 2.46 \[ \int \sec ^5(c+d x) (a+i a \tan (c+d x))^2 \, dx=\frac {7\,a^2\,\mathrm {atanh}\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{8\,d}-\frac {-\frac {9\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{11}}{8}+a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{10}\,4{}\mathrm {i}+\frac {89\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9}{24}-a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8\,4{}\mathrm {i}+\frac {11\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7}{4}+a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6\,8{}\mathrm {i}+\frac {11\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5}{4}-a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\,8{}\mathrm {i}+\frac {89\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{24}+\frac {a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,4{}\mathrm {i}}{5}-\frac {9\,a^2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{8}-\frac {a^2\,4{}\mathrm {i}}{5}}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{12}-6\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{10}+15\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8-20\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+15\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4-6\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )} \]
[In]
[Out]